package com.cby.library.common.base

import android.content.Context
import android.view.LayoutInflater
import android.view.View

abstract class IViewSection<T>(protected val context: Context) {

    var rootView: View

    init {
        rootView = LayoutInflater.from(context).inflate(getLayoutId(), null)
        populateView()
    }

    abstract fun populateView()

    abstract fun getLayoutId(): Int

    abstract fun setData(data: T)

    open fun onStart(){

    }

    open fun onStop() {

    }
}